Logic or Algorithm to solve this problem [closed]
        Posted  
        
            by 
                jade
            
        on Programmers
        
        See other posts from Programmers
        
            or by jade
        
        
        
        Published on 2012-11-30T13:02:34Z
        Indexed on 
            2012/11/30
            17:19 UTC
        
        
        Read the original article
        Hit count: 287
        
I have two lists.
List1 {a,b,c,d,e}
and
List2 {f,g,h,i,j}
The relation between the two list is as follows
a->g,a->h,h->c,h->d,d->i,d->j
Now I have these two lists displayed. Based on the relation above on selecting element a from List1, List2 shows g,h. On selecting h from List2, in List1 c,d are shown in List1. On selecting d from List1 it shows i,j in List2.
How to trace back to initial state by deselecting the elements in reverse order in which they have been selected?
© Programmers or respective owner